<?php 
// open graph type
$this->placeholder('type')->set('product');
?>
<div class="content">
<h2><?php print $this->product->name.($this->product->getManufacturer() ? ' ('.$this->product->getManufacturer()->name.')' : ''); ?></h2>
<p>Gehe direkt zu <a href="#recipes-list">Cocktailrezepte</a> und 
<a href="#offer-list">Anbieter</a>.</p>
<h3>Produkt-Informationen</h3>
<?php if($this->product->getImage()) { $this->placeholder('image')->set($this->product->getImage()); ?><img 
	src="<?php echo $this->product->getImage(); ?>"
	alt="<?php
	print str_replace ( '\\', '', $this->product->name ) ;
	?>"
	title="<?php
	print str_replace ( '\\', '', $this->product->name ) ;
	?>"
	style="float: right; margin-right: 25px; max-width: 100px; max-height: 160px; margin-top: 2em; margin-bottom: 20px;" />
<?php } ?>
<?php if($this->product->getIngredient()->name){ ?>
<div class="attribut">Zutat:</div>
<div class="wert" style="width: 14em;"><a href="<?php print $this->url(array('id'=>$this->product->getIngredient()->getUniqueName(),'controller'=>'ingredient')); ?>"><?php print $this->product->getIngredient()->name; ?></a></div>
<?php } ?>
<?php if($this->product->getManufacturer()->name){ ?>
<div class="attribut">Marke/Hersteller:</div>
<div class="wert" style="width: 14em;"><a href="<?php print $this->url(array('id'=>$this->product->getManufacturer()->getUniqueName(),'controller'=>'manufacturer')); ?>"><?php print $this->product->getManufacturer()->name; ?></a></div>
<?php } ?>
<div class="attribut">Göße:</div>
<div class="wert" style="width: 14em;"><?php print number_format($this->product->size,2,',','.'); ?> <?php print $this->product->unit; ?></div>
<?php if($this->product->alcoholLevel){ ?>
<div class="attribut">Alkoholgehalt:</div>
<div class="wert" style="width: 14em;"><?php print $this->product->alcoholLevel; ?>%</div>
<?php } ?>
<?php if($this->product->caloriesKcal){ ?>
<div class="attribut">Kalorien:</div>
<div class="wert" style="width: 14em;"><?php print $this->product->caloriesKcal; ?> kcal / <?php print number_format($this->product->size,2,',','.'); ?> <?php print $this->product->unit; ?></div>
<?php } ?>
<?php if($this->product->fruitConcentration){ ?>
<div class="attribut">Fruchtgehalt:</div>
<div class="wert" style="width: 14em;"><?php print $this->product->fruitConcentration; ?> %</div>
<?php } ?>
<?php if($this->product->color){ ?>
<div class="attribut">Farbe:</div>
<div class="wert" style="width: 14em;"><?php print $this->product->color; ?></div>
<?php } ?>
<?php if($this->product->getAveragePrice()){ ?>
<div class="attribut">Preis:</div>
<div class="wert" style="width: 14em;"><?php print number_format($this->product->getAveragePrice(),2,',','.'); ?> Euro</div>
<?php } ?>
<?php if($this->product->getRecipes()){ ?>
<h3 id="recipes-list">Cocktailrezepte mit <?php print $this->product->name; ?></h3>
<ul class="no-bullet abstand_oben">
<?php foreach ($this->product->getRecipes() as $recipe){ ?>
	<li style="float: left; clear: none;"><?php $this->cocktailPreview($recipe)?></li>
	<?php } ?>
</ul>
<?php } ?>
<?php if($this->product->getOffers()) { ?>
<h3 id="offer-list"><?php print $this->ingredient->name; ?> Anbieter</h3>
<ul>
<?php
$i=0;
foreach ($this->product->getOffers() as $offer) {
	$i++;
	print '<li style="text-align: left;'.
	($i==1 ? 'clear: left;' : 'clear: none;').'">
	<a href="'.$offer['shopUrl'].'">';
	print ''.$offer['shop'].'</a> für '.number_format((double)$offer['price'],2,',','.').' €</li>';
}
?>
</ul>
<?php } ?>
</div>
